The present invention discloses a system and associated method for automated analysis and correction of program codes and/or data based on runtime behavior of a software application. Conventional debugging tools focus only on static structures and logics of software applications. To fix certain types of errors, the conventional debugging tools search knowledge based systems for similar errors and corresponding solutions. Because conventional debugging tools have limited functionalities in debugging runtime incidents of software applications, troubleshooting of software applications are labor-intensive and maintenance of software applications is costly.